import { createApp } from 'vue'
import './style.css'

//引入elementui组件
//import ElementPlus from 'element-plus'
//import 'element-plus/dist/index.css'
//全局引入 icon
//import * as Icons from '@element-plus/icons-vue'; 

//引入 vantUI库
import Vant from 'vant'
import 'vant/lib/index.css'

//路由
import router from './myrouter';
import App from './App.vue'

//axios
import axios from 'axios';
const instance = axios.create({
    baseURL: '/developer',
    proxy: {
      host: 'localhost',
      port: 8080,
    },
  });


//使用 morkjs
import './js/mockServer.js'

//使用vuex
// import store from './js/store.js'

//使用pinia
import { createPinia } from 'pinia'
const pinia = createPinia()		// 创建Pinia实例

//刷新后，显示之前的操作，和 pinia配合使用
import piniaPluginPersist from 'pinia-plugin-persist'
pinia.use(piniaPluginPersist)

const myvue = createApp(App);

// 注册所有图标  
// Object.keys(Icons).forEach(key => {  
//     myvue.component(Icons[key].name, Icons[key]);  
//   });

myvue.use(router)
myvue.use(Vant)
// myvue.use(store)

 
myvue.use(pinia)		
myvue.mount('#app')
